<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'reservation-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'total_price'); ?>
		<?php echo $form->textField($model,'total_price',array('size'=>11,'maxlength'=>11)); ?>
		<?php echo $form->error($model,'total_price'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'customer_id'); ?>
		<?php echo $form->dropDownList($model, 'customer_id', CHtml::listData(Customer::model()->findAllbySql('SELECT id, CONCAT(first_name, " ", last_name) as first_name FROM customer WHERE id='.$_SESSION['key']), 'id' , 'first_name'),array('options'=>array($_SESSION['key']=>array('selected'=>'selected')))); ?>
		<?php echo $form->error($model,'customer_id'); ?>
	</div>
	
	<div class="row">
		<?php echo $form->labelEx($model,'reservedby_id'); ?>
		<?php echo $form->dropDownList($model, 'reservedby_id', array('value'=>Yii::app()->user->name),array('disabled'=>'disabled')); ?>
		<?php echo $form->error($model,'reservedby_id'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->